global WorkMenu, FieldMenu, XtraMenu, ButnMenu, DrawMenu, FieldsLocked
if FieldsLocked then
put "Unlock All " into locker
else put "Lock All " into locker
if the icon of background button id 26 is 0 then
put "Show Tools " into shower
else
put "Hide Tools " into shower
end if
if the visible of field "CardNumber" is false then
put "Show Slide Numbers " into ShowNo
else
put "Hide Slide Numbers " into ShowNo
end if
put NewMenu("Work","About SmartSlides ","(-",shower,"New Lecture…", "Make Next Slide ","Set Effects…","Reset Slide ","Reset All Slides ", ShowNo,"Sort Slides ","Prepare To Print ","(-","AutoReset ") into WorkMenu
if "true" is in the name of field id 306
then
CheckMenu WorkMenu,13,true
end if
put NewMenu("Field","Title ","Body ","FullSlide ","BigType ", "PopUp ","ShimmerField ","Bulger ","Rectangle ","Scrolling ", "TypeWriter…","AutoScroll…","Columns…","(-",locker) into FieldMenu
put NewMenu("Xtra","Chicago 12…","Geneva 12…","SmartTimes 18…", "SmartTimes 24…","SmartBig 36…","SmartBasel 48…","Other Font…", "(-","Squeeze Lines ","Change Style…","Set Scroll Rate…", "(-","LeftAlign…","Center…","RightAlign…") into XtraMenu
put NewMenu("Butn","Begin Chain…","(-","Hiliter ","Tile Hiliter…", "Flasher ","Inverter ","GreyOut ","Shutter ","Mask ","Shrinker…", "Stepper ","Vanilla ","CheckBox ","Arrow ","Hand ") into ButnMenu
put NewMenu("Draw","Straight Line…","Wavy Line…","Dotted Line…", "Straight Arrow…","Wavy Arrow…","Dotted Arrow…", "Border Field…","Shadow Field…","Connect Fields…","Graph…","(-", "Erase Recent ","Erase All Graphics ","Protect Visible ") into DrawMenu
end openBackground
on closeBackground
global WorkMenu, FieldMenu, XtraMenu, ButnMenu, DrawMenu
put DeleteMenu(WorkMenu) into WorkMenu
put DeleteMenu(FieldMenu) into FieldMenu
put DeleteMenu(XtraMenu) into XtraMenu
put DeleteMenu(ButnMenu) into ButnMenu
put DeleteMenu(DrawMenu) into DrawMenu
end closeBackground
on idle
global WorkMenu, FieldMenu, XtraMenu, ButnMenu, DrawMenu, lastTick
if (the ticks-lastTick)>120 then
put the ticks into lastTick
ShowMenu WorkMenu
ShowMenu FieldMenu
ShowMenu XtraMenu
ShowMenu ButnMenu
ShowMenu DrawMenu
end if
pass idle
end idle
on doMenu Command
global WorkMenu, FieldMenu, XtraMenu, ButnMenu, DrawMenu
--dividing commands into two types avoids nesting blocks too deeply.
--commands whose names involve "…" are sent to one handler
--newly defined commands with non-breaking spaces are sent to another
--if the optionKey is down then Help Command --handles requests for Help
--else
if "…" is in Command then FollowUp Command --for extended commands
else if " " is in Command then Execute Command --for simple commands
else pass domenu
end domenu
on FollowUp Command
--handles menu items involving "…"
if the optionkey is down then GiveHelp Command
else if Command is "New Lecture…" then newLecture --work
else if Command is "Set Effects…" then SetEffects --menu
else if Command is "TypeWriter…" then MakeTypeWriterField --field
else if Command is "AutoScroll…" then MakeAutoscroll --menu
else if Command is "Columns…" then MakeColumns
else if Command is "Chicago 12…" then SetMode "Chicago 12" --xtra
else if Command is "Geneva 12…" then SetMode "Geneva 12" --menu
else if Command is "SmartTimes 18…" then SetMode "SmartTimes 18"
else if Command is "SmartTimes 24…" then SetMode "SmartTimes 24"
else if Command is "SmartBig 36…" then SetMode "SmartBig 36"
else if Command is "SmartBasel 48…" then SetMode "SmartBasel 48"
else if Command is "Other Font…" then SetMode "Font"
else if Command is "Change Style…" then SetMode "Style"
else if Command is "Set Scroll Rate…" then SetMode "SetRate"
else if Command is "LeftAlign…" then SetMode "left"
else if Command is "Center…" then SetMode "center"
else if Command is "RightAlign…" then SetMode "right"
else if Command is "Begin Chain…" then BeginChain "withMessage" --butn
else if Command is "Tile Hiliter…" then SetMode "Tile" --menu
else if Command is "Shrinker…" then SetMode "ShrinkWrap"
else if "line" is in Command then MakeLine Command --draw
else if "arrow" is in Command then MakeArrow Command --menu
else if Command is "Border Field…" then SetMode "BorderField"
else if Command is "Shadow Field…" then SetMode "ShadowField"
else if Command is "Connect Fields…" then SetMode "Connect1",2
else if Command is "Graph…" then send MakeGraph to field "Scripts"
end FollowUp
on Execute Command
--handles menu items without "…" but with non-breaking space
if the optionkey is down then GiveHelp Command
else if Command is "Show Tools " then ShowTools --work
else if Command is "Hide Tools " then HideTools --menu
else if Command is "Make Next Slide " then MakeCard
else if Command is "Reset Slide " then Reset
else if Command is "Reset All Slides " then ResetAll
else if Command is "Show Slide Numbers " then ShowNumber
else if Command is "Hide Slide Numbers " then HideNumber
else if Command is "Sort Slides " then SortAll
else if Command is "Prepare To Print " then PrepForPrinting
else if Command is "About SmartSlides " then ShowCredits
else if Command is "AutoReset " then ChangeAutoReset
else if Command is "Title " then MakeTitleField --field
else if Command is "Body " then CreateField 8 --menu
else if Command is "FullSlide " then CreateField 5
else if Command is "BigType " then CreateField 76
else if Command is "PopUp " then MakePopUp
else if Command is "ShimmerField " then CreateField 205
else if Command is "Bulger " then CreateField 244
else if Command is "Rectangle " then CreateField 137
else if Command is "Scrolling " then CreateField 141
else if Command is "Lock All " then LockFields
else if Command is "Unlock All " then UnlockFields
else if Command is "Squeeze Lines " then SetSqueeze --xtra menu
else if Command is "End Chain " then EndChain --butn
else if Command is "Hiliter " then CreateButton 9 --menu
else if Command is "Flasher " then CreateButton 82
else if Command is "Inverter " then CreateButton 292
else if Command is "GreyOut " then CreateButton 139
else if Command is "Shutter " then CreateButton 83
else if Command is "Mask " then CreateButton 79
else if Command is "Stepper " then CreateButton 140
else if Command is "Vanilla " then CreateButton 296
else if Command is "CheckBox " then CreateButton 110
else if Command is "Arrow " then CreateButton 115
else if Command is "Hand " then CreateButton 116
else if Command is "Erase Recent " then UndoDrawing --draw
else if Command is "Erase All Graphics " then EraseCard --menu
else if Command is "Protect Visible " then NoScripts
end Execute
------------------------Handlers for Menu Items-------------------------
---(Handlers for menu items in Work Menu are all in the stack script.)--
on MakeTitleField
global Speed, Specs, ObjectID
put 1000 into Speed
put "0,0,14,45,488,45" into Specs
send drawline to field "Scripts"
put 100 into Speed
CreateField 3
lock screen
set the lockMessages to true
push card
go next
pop card
set the lockMessages to false
unlock screen
select text of card field id ObjectID
end MakeTitleField
--(CreateField handler is in stack script.)
on MakePopUp
global ObjectID
createbutton 123
put ObjectID into NewID
CreateField 122
put ObjectID into NewFieldID
choose browse tool
put NewFieldID into line NewID of field "PopUps"
set the name of card field id NewFieldId to "PopUp " & NewID
choose field tool
select card field id NewFieldID
end MakePopUp
--(MakeTypeWriterField handler is in stack script.)
--(MakeAutoscroll handler is in stack script.)
on MakeColumns
global ObjectID, AreaOkayID
lock screen
requestPatience
CreateButton 282
put ObjectID into AreaOkayID
Createfield 4
put "Adjust this to the size and location of the area " & "in which you wish the columns to appear." & return & return & "Then restore browse tool" & return & "and click " & quote & "Area Okay" & quote into card field id ObjectID
unlock screen
put empty into msg
hide msg
select card field id ObjectID
end MakeColumns
on FinishColumns
global FieldsLocked, AreaOkayID
hide button id AreaOkayID
set the name of button id AreaOkayID to "Hidden"--faster than deleting
ask "How Many Columns Do You Want?" with "2"
if it is empty or it is 0 then exit to HyperCard
do "put " & it & " into LastColumn" --converts "one"…"ten" to numbers
answer "What style would you like?" with "Transparent" or "Rectangle" or "Shadow"
put it into ColumnStyle
answer "How much space would you like between fields?" with "5 pixels" or "None" or "Overlap"
if it is "5 pixels" then put 5 into Buffer
if it is "None" then put 0 into Buffer
if it is "Overlap" then put -8 into Buffer
put the rect of card field "Column" into ColumnRect
put (item 3 of ColumnRect) - (item 1 of ColumnRect) into AreaWidth
subtract min(buffer,0) from AreaWidth
put (trunc(AreaWidth/LastColumn) - Buffer) into ColumnWidth
put (LastColumn*(ColumnWidth + Buffer)) - Buffer into WidthToUse
put round((AreaWidth-WidthToUse)/2) into Nudge
add Nudge to item 1 of ColumnRect
put (item 1 of ColumnRect) + ColumnWidth into item 3 of ColumnRect
answer "How should text be arranged in a column?" with "LeftJustify" or "Center" or "RightJustify"
put it into columnAlign
If "Left" is in columnAlign then put "left" into ColumnAlign
If "Right" is in columnAlign then put "right" into ColumnAlign
lock screen
put empty into card field "Column"
set the textalign of card field "Column" to ColumnAlign
set the style of card field "Column" to ColumnStyle
set the rect of card field "Column" to ColumnRect
set the locktext of card field "Column" to false
put false into FieldsLocked
set the icon of background button id 25 to "UnlockedFields"
ChangeMenu FieldMenu,14,"Lock All "
put the id of card field "Column" into FirstColumn
set the name of card field id FirstColumn to "Column " & FirstColumn
--assures uniqueness of name used for columns in this set
select card field id FirstColumn
domenu "Copy Field"
unlock screen
put (FirstColumn - 1) + LastColumn into LastColumn
repeat with i = (FirstColumn + 1) to LastColumn
put Buffer + (item 3 of ColumnRect) into item 1 of ColumnRect
add (ColumnWidth + Buffer) to item 3 of ColumnRect
domenu "paste field"
set the rect of card field id i to ColumnRect
end repeat
select text of card field id FirstColumn
end FinishColumns
--(LockFields handler is in stack script.)
--(UnlockFields handler is in stack script.)
on SetMode this,clicks
global Mode
lockFields
put this into Mode
RequestClick clicks
end SetMode
on SetSqueeze
global squeezer, XtraMenu
if Squeezer is true then
put false into Squeezer
CheckMenu XtraMenu,9,False
else
put true into Squeezer
CheckMenu XtraMenu,9,True
end if
end SetSqueeze
--(CreateButton handler is in stack script.)
on BeginChain which
global Mode, ButnMenu
put "First" into Mode
showChainTools
if which is "withMessage" then
show msg at 15,320
put "Click buttons in chain, then use End Chain (on Buttons menu)."
end if
ChangeMenu ButnMenu,1,"End Chain "
set the hilite of background button id 99 to true
lockFields
end BeginChain
on EndChain
global Mode, ButnMenu, Linking
if the visible of background button id 99 is false
then
hideChainTools
end if
hide msg
put empty into Mode
put false into Linking
set the hilite of background button id 99 to false
ChangeMenu ButnMenu,1,"Begin Chain…"
end EndChain
on MakeLine whichKind
global lineFlag, LineStyle, NextLine, Mode, ObjectID
put word 1 of whichKind into LineStyle
put 1 into lineFlag
put "Line" into Mode
lockFields
requestPatience
lock screen
createButton 124
choose browse tool
set the name of button ID ObjectID to "Draw " & whichkind
put ObjectID into NextLine
unlock screen
beep
requestClick 2
end MakeLine
on MakeArrow ArrowStyle
global lineFlag, LineStyle, NextLine, Mode, ObjectID
put word 1 of ArrowStyle into LineStyle
put 3 into lineFlag
put "Line" into Mode
requestPatience
lock screen
createButton 124
choose browse tool
set the name of button ID ObjectID to "Draw " & ArrowStyle
put ObjectID into NextLine
lockFields
unlock screen
beep
requestClick 2
end MakeArrow
on UndoDrawing
choose eraser tool
doMenu "Revert"
choose browse tool
end UndoDrawing
on EraseCard
choose select tool
domenu "Select All"
domenu "Clear Picture"
choose browse tool
lock screen
set the lockmessages to true
go next
go previous
set the lockmessages to false
unlock screen
end EraseCard
--(NoScripts handler is in stack script.)
---------------------Main Handlers for MouseClicks----------------------
on mouseDown
global ThisObject, Mode, NextObject, ObjectName, Shift
put the shiftKey into Shift
put the ID of the target into ThisObject
put ThisObject into NextObject
put the short name of the target into ObjectName
if Mode is empty then FollowChain
else if Mode is "Line" then send Draw to field "Scripts" --create line
else if Mode is "First" then ChainFirst --put first Object in chain
else if Mode is "Next" then ChainNext --put later object in chain
else Modify --alter field
end MouseDown
on mouseUp
global NextObject, Chain, Mode, ObjectName
if Mode is not empty then exit to HyperCard
else
repeat with i = 1 to the number of words in Chain
put word i of Chain into NextObject
if "L" is in NextObject
then
delete first char of NextObject
visual effect iris close to black
visual effect iris open to card
go to card id nextobject
exit mouseUp
end if
put line NextObject of field "ObjectNames" into ObjectName
ClickUp --activate next object in chain
end repeat
end if
unlock screen
end MouseUp
-----------------Supporting Handlers for MouseDown----------------------
on FollowChain
global ThisObject, NextObject, Step, Chain, ObjectName, Linking
if "card" is in ThisObject and not Linking then exit to HyperCard
if ObjectName is "Link" then exit to HyperCard
--else follow chain starting here
put item 1 of line ThisObject of field "Chains" into Step
put item (Step + 1) of line ThisObject of field "Chains" into Chain --existing chain corresponding to current step
if Chain is empty then
put ThisObject into Chain
put ObjectName into line ThisObject of field "ObjectNames"
end if
repeat with i = 1 to the number of words in Chain
put word i of Chain into NextObject
if "L" is in NextObject then next repeat --link to card later
put line NextObject of field "ObjectNames" into ObjectName
ClickDown --activate next object in chain
end repeat
end FollowChain
on ClickDown
global NextObject, ObjectName, NextLine, Mode
put NextObject into NextLine
if "Draw " is in ObjectName then send GetLines to field "Scripts"
else if "Shrinker" is in ObjectName then Shrink NextObject
else if ObjectName is "Hiliter" or ObjectName is "Hand"
then set the hilite of button id NextObject to true
else if ObjectName is "Inverter"
then set the hilite of button id NextObject to false
else if ObjectName is "GreyOut" then GreyOut NextObject
else if ObjectName is "Mask" then hide button id NextObject
else if ObjectName is "Flasher" then doFlashing NextObject
else if ObjectName is "Shutter" then doShutter NextObject
else if ObjectName is "PopItUp" then doPopUp NextObject
else if "PopUp" is in ObjectName then hide card field id NextObject
else if "DingBat" is in ObjectName then doDingBat NextObject
else if ObjectName is "Delay" then wait 60
else if ObjectName is "Beep" then beep
else if ObjectName is "LockScreen" then ChangeScreenLock
else if ObjectName is "Shimmer" then Shimmer NextObject
else if ObjectName is "Bulger" then Bulge NextObject
else if ObjectName is "TypeWriter" then doTyping NextObject
else if ObjectName is "Opener" then exit ClickDown
else if "AutoScroller" is in ObjectName
then send autoscroll to card field id NextObject
else if "Step" is in ObjectName then checkShift
else if ObjectName is "Graph" then send drawgraph to field "Scripts"
else if ObjectName is "Vanilla" then exit ClickDown
else SelectLine
end ClickDown
--(Shrink handler is in stack script.)
on GreyOut given
choose rectangle tool
set the filled to true
set the pattern to 13
put topleft of button id given into corner1
put bottomright of button id given into corner2
add 1 to item 1 of corner1
add 1 to item 2 of corner1
subtract 1 from item 1 of corner2
subtract 1 from item 2 of corner2
drag from corner1 to corner2 with optionkey
set the filled to false
choose browse tool
end GreyOut
on ClearFromGrey
global NextObject
choose select tool
put topleft of button id NextObject into corner1
put bottomright of button id NextObject into corner2
drag from corner1 to corner2
doMenu "Clear Picture"
choose browse tool
end ClearFromGrey
on doFlashing given
global FlashNumber, ShortDelay, LongDelay
repeat with i = 1 to FlashNumber
wait ShortDelay
set the hilite of button id given to not the hilite of button id given
wait LongDelay
set the hilite of button id given to not the hilite of button id given
end repeat
end doFlashing
on doShutter given
if the style of button id given is "opaque"
then
set the style of button id given to "transparent"
else
set the style of button id given to "opaque"
end if
end doShutter
on doPopUp given
put item 1 of line given of field "PopUps" into FieldToPop
show card field id FieldToPop
end doPopUp
on doDingBat given
global ObjectName
if "CheckBox" is in ObjectName then doCheckBox given
else if "Arrow" is in ObjectName then doArrowIcon given
end doDingBat
on doCheckBox given
if the icon of button id given is 10454 then set the icon of button id given to 23664
else set the icon of button id given to 10454
end doCheckBox
on doArrowIcon given
if the icon of button id given is 2415 then set the icon of button id given to 2148
else set the icon of button id given to 2415
end doArrowIcon
on ChangeScreenLock
set the lockscreen to not the lockscreen
end ChangeScreenLock
on Shimmer given
repeat with i = 1 to 6
set the style of card field id given to opaque
set the style of card field id given to shadow
end repeat
end Shimmer
on Bulge given
repeat with i = 1 to 5
set the textsize of card field ID given to 18
wait 3
set the textsize of card field ID given to 24
wait 20
set the textsize of card field ID given to 12
wait 10
end repeat
end Bulge
--(DoTyping handler is in stack script.)
on checkShift
global NextObject, Shift
if Shift is down then
put the number of Button ID NextObject into wanted
RestoreStep wanted
exit to HyperCard
end if
end checkShift
on SelectLine
global ThisObject
if word 1 of the long name of the target is not "card"
then exit to HyperCard
if word 2 of the long name of the target is not "field"
then exit to HyperCard
if the style of card field id ThisObject is "scrolling"
then
put clickline() into ThisLine
if line thisLine of card field id ThisObject is empty
then
select empty
else
select line ThisLine of card field id ThisObject
end if --may scroll field a bit!
exit to HyperCard
end if
end SelectLine
on ChainFirst
global ThisObject, Mode, Step, MainObject, ObjectName, NextObject
if ObjectName is "Link"
then
endChain
answer "Can't begin chain with link to another card."
exit to HyperCard
end if
put word 2 of the long name of the target into ObjectType
put ObjectName into line ThisObject of field "ObjectNames"
if ObjectType is "button" then QuickHilite ThisObject
put item 1 of line ThisObject of field "Chains" into Step
if Step is empty then
put 1 into Step
put 1 into line ThisObject of field "Chains"
end if
put ThisObject into MainObject
put MainObject into item (Step + 1) of line MainObject of field "Chains" --assures an item
if "Shrinker" is in ObjectName then Shrink ThisObject
if ObjectName is "PopItUp" then DoPopUp ThisObject
if "PopUp" is in ObjectName then hide card field id ThisObject
if ObjectName is "Mask" then hide button id ThisObject
if "DingBat" is in ObjectName then doDingBat ThisObject
put ThisObject into NextObject
if "Step" is in ObjectName
then
changeStep
put Step - 1 into Step
end if
put "Next" into Mode
end ChainFirst
on QuickHilite this
set the hilite of button id This to not the hilite of button id This
set the hilite of button id This to not the hilite of button id This
end QuickHilite
on changeStep
global NextObject, ObjectName, Mode, Step
add 1 to Step
put Step into item 1 of line NextObject of field "Chains"
put item (Step + 1) of line NextObject of field "Chains" into NChain
if Mode is empty or mode is "First" then
if NChain is empty or NChain is NextObject
then
set the name of button ID NextObject to "Step (" & Step & ")"
else
set the name of button ID NextObject to "Step " & Step
end if
end if
end changeStep
on ChainNext
global ThisObject, Step, MainObject, ObjectName, Linking, Mode
put word 2 of the long name of the target into ObjectType
if ObjectName is not "link" and not linking then put ObjectName into line ThisObject of field "ObjectNames"
if Linking
then
put "L" & word 3 of the id of this card into ThisObject
pop card
put empty into msg
put empty into ObjectType
put empty into ObjectName
hide msg
endChain
showTools
end if
If ObjectName is "Link" and not Linking
then
GetLink
exit to HyperCard
else
if ObjectType is "button" then QuickHilite ThisObject
end if
put " " & ThisObject after item (Step + 1) of line MainObject of field "Chains"
if ObjectName is "PopItUp" then DoPopUp ThisObject
if "PopUp" is in ObjectName then hide card field id ThisObject
if "Shrinker" is in ObjectName then Shrink ThisObject
if ObjectName is "Mask" then hide button id ThisObject
if "DingBat" is in ObjectName then doDingBat ThisObject
end ChainNext
on GetLink
global Linking, Origin
put true into Linking
put the id of this card into Origin
push card
hidetools
requestcard
end GetLink
on Modify
global Mode, Frame, Rect1, Rect2, Chain
put empty into Chain
put the long name of the target into longname
if word 1 of longname is "card" and word 2 of longname is "id"
then exit Modify
put the rect of the target into Frame
lock screen
set the cursor to busy
If Mode is "Connect1" then put Frame into Rect1
else if Mode is "Connect2" then
put Frame into Rect2
send ConnectFields to field "Scripts"
else if Mode is "shrinkwrap" then ShrinkWrap
else if Mode is "tile" then tile
else if "toggle" is in Mode then toggle
else if Mode is "Chicago 12" then SetFont
else if Mode is "Geneva 12" then SetFont
else if Mode is "SmartTimes 18" then SetFont
else if Mode is "SmartTimes 24" then SetFont
else if Mode is "SmartBig 36" then SetFont
else if Mode is "SmartBasel 48" then SetFont
else if Mode is "Font" then ChooseFont
else if Mode is "Style" then ChooseStyle
else if Mode is "SetRate" then SetRate
else if Mode is "BorderField" then send BorderField to field "Scripts"
else if Mode is "ShadowField" then send ShadowField to field "Scripts"
else
align
end if
hide msg
if Mode is "Connect1" then put "Connect2" into Mode
else
put empty into Mode
unlockFields
end if
choose browse tool
beep
end Modify
------------------Supporting Handlers for MouseUp-----------------------
on ClickUp
global NextObject, ObjectName
if ObjectName is "Hiliter" or ObjectName is "Hand"
then set the hilite of button id NextObject to false
else if ObjectName is "Inverter"
then set the hilite of button id NextObject to true
else if ObjectName is "GreyOut" then ClearFromGrey
else if ObjectName is "LockScreen" then ChangeScreenLock
else if "Step" is in ObjectName then ChangeStep
end ClickUp
on GetLink
global Linking
put true into Linking
push card
hidetools
requestcard
end GetLink
on ChooseFont
choose Field tool
select the target
domenu "Text Style..."
choose browse tool
end ChooseFont
on ChooseStyle
choose Field tool
select the target
domenu "Field Info..."
choose browse tool
end ChooseStyle
on align --sets textalign property of target field
global Mode
if mode is "left" or mode is "center" or mode is "right" then
set the textAlign of the target to Mode
unlockFields
end if
end align
on ShrinkWrap
global ObjectNumber, ObjectID
put the id of the target into thisField
put the rect of card field id thisField into rectWanted
put the textHeight of card field id thisField into Increment
add 1 to item 2 of rectWanted --fudging location of top edge
if increment > 20 then add 1 to item 2 of rectWanted --more fudging
Choose button tool
set the cursor to busy
show background button "Shrinker"
select background button "Shrinker"
doMenu "Copy Button"
doMenu "Paste Button"
hide background button "Shrinker"
put the number of card buttons into ObjectNumber
put the ID of button ObjectNumber into ObjectID
set the cursor to busy
set the rect of button ObjectNumber to rectWanted
set the name of button ObjectNumber to "Shrinker " & Increment
set the cursor to busy
put rectWanted into line ObjectID of field "ButtonRects"
end ShrinkWrap
on tile
global ObjectNumber
put the id of the target into thisField
put the rect of card field id thisField into rectWanted
add 2 to item 2 of rectWanted
put the textHeight of card field id thisField into Increment
set the cursor to busy
put item 4 of rectWanted into BottomEdge
put (item 2 of rectWanted) + increment into item 4 of rectWanted
Choose button tool
show background button "Hiliter"
select background button "Hiliter"
doMenu "Copy Button"
hide background button "Hiliter"
set the cursor to busy
put 1 into lineNumber
repeat while (item 2 of rectWanted) < BottomEdge
if line lineNumber of card field id thisField is not empty then
doMenu "Paste Button"
put the number of card buttons into ObjectNumber
set the rect of button ObjectNumber to rectWanted
beep
end if
add increment to item 2 of rectWanted
add increment to item 4 of rectWanted
add 1 to lineNumber
if (item 4 of rectWanted) > BottomEdge
then
put BottomEdge into item 4 of rectWanted
end if
set the cursor to busy
end repeat
lockFields
end tile
on newbutton
--puts warning and uniform scripts in all new buttons,
--created using "New Button" in the Objects menu.
if the short name of the target is "New Button"
then
set the script of the target to StockScript("button")
pass newButton
end if
end newbutton
on newField
--puts warning and uniform scripts in all new fields,
--created using "New Field" in the Objects menu.
put the short name of the target into FldName
if "card field id" is in FldName or "bkgnd field id" is in FldName
then
set the script of the target to StockScript("field")
pass newField
end if
end newField
function StockScript object
put "--To avoid interfering with the way SmartSlides " & "handles mouseclicks," & return into NewScript
put "--be sure to keep both a mouseUp and a mouseDown handler" & return after NewScript
put "--in the script of this " & object & "." after NewScript
put return & return after NewScript
put "on mouseDown" & return & "end mouseDown" &return after NewScript
put return after NewScript
put "on mouseUp" & return & "end mouseUp" & return after NewScript
return NewScript
end StockScript
on deleteButton
global Deleted
if word 1 of the long name of the target is not "card" then
choose browse tool
exit to HyperCard
end if
put the id of the target into Deleted
if "CursorCover" is in the short name of the target then --block deletion, so Typewriter field will still work properly
choose browse tool
end if
if "PopItUp" is in the short name of the target then
send mouseDown to the target
put "Deleting PopUp field will delete button too."
choose browse tool
end if
EditOut
end deleteButton
on deleteField
global Deleted
if word 1 of the long name of the target is not "card"
then
choose browse tool
exit to HyperCard
end if
put the short name of the target into ObjectName
put the id of the target into Deleted
EditOut
if ObjectName is "TypeWriter" then
put Deleted into SaveID
set the name of card field ID Deleted to "ClearThis"
set the name of card button ("CursorCover "& Deleted) to "ClearThis"
select card button "ClearThis"
domenu "Clear Button"
select card field "ClearThis"
domenu "Clear Field"
else if "PopUp" is in ObjectName then
put Deleted into SaveID
set the name of card field ID Deleted to "ClearThis"
set the name of card button id (word 2 of ObjectName) to "ClearThis"
put empty into line (word 2 of ObjectName) of field "PopUps"
put true into FieldIsEmpty
repeat with i = 1 to the number of lines of field "PopUps"
if line i of field "PopUps" is not empty
then
put false into FieldIsEmpty
exit repeat
end if
end repeat
if FieldIsEmpty then put empty into field "PopUps"
select card button id (word 2 of ObjectName)
domenu "Clear Button"
select card field id SaveId
domenu "Clear Field"
hide msg
end if
end deleteField
on deleteCard
if the number of the target is the number of cards of this background
then
send closeBackground to this background
end if
end deleteCard
on EditOut
global Deleted
put empty into line Deleted of field "Chains"
put empty into line Deleted of field "ObjectNames"
if Deleted is in field "Chains"
then
repeat with i = 1 to the number of lines of field "Chains"
if deleted is in line i of field "Chains" then
repeat with j = (the number of items of line i of field "Chains") down to 2
repeat with k = (the number of words of item j of line i of field "Chains") down to 2
if word k of item j of line i of field "Chains" is deleted
then put empty into word k of item j of line i of field "Chains"
end repeat
end repeat
end if
end repeat
end if
end EditOut
-- part 213 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=8 top=0 right=298 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ╩BackDrop
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 1 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=228 top=318 right=341 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 1014 / 1014
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Prev
----- HyperTalk script -----
on mouseUp
if true is in the name of field id 306 then CleanUp
DoFX previous
end mouseUp
on mouseDown
end mouseDown
-- part 2 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=256 top=318 right=341 bottom=281
-- title width / last selected line: 0
-- icon id / first selected line: 1013 / 1013
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Next
----- HyperTalk script -----
on mouseUp
if true is in the name of field id 306 then CleanUp
DoFX "next"
end mouseUp
on mouseDown
end mouseDown
-- part 98 (button)
-- low flags: 00
-- high flags: 4002
-- rect: left=0 top=315 right=342 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: BackDrop
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 3 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=16 top=12 right=45 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 91
-- text size: 24
-- style flags: 0
-- line height: 32
-- part name: Title
-- part 4 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=50 top=50 right=250 bottom=450
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 91
-- text size: 18
-- style flags: 0
-- line height: 24
-- part name: Column
-- part 5 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=24 top=17 right=307 bottom=482
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 91
-- text size: 24
-- style flags: 0
-- line height: 32
-- part name: FullCard
-- part 8 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=16 top=48 right=305 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 91
-- text size: 24
-- style flags: 0
-- line height: 32
-- part name: body
-- part 26 (button)
-- low flags: 00
-- high flags: 0002
-- rect: left=11 top=320 right=338 bottom=35
-- title width / last selected line: 0
-- icon id / first selected line: 15566 / 15566
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hide
----- HyperTalk script -----
on mouseUp
if the optionkey is up then
if (the icon of me is 15566) or (the icon of me is 24272)
then
HideTools
else
SetUp
end if
else
if (the icon of me is 15566) or (the icon of me is 24272)
then
GiveHelp "Hide Tools "
else
GiveHelp "Show Tools "
end if
end if
end mouseUp
on SetUp
global ToolView
if the icon of me is 0 or ToolView is empty
then
if ToolView is not "ButtonTools" and the visible of background button id 16 is true then HideButtonTools
if ToolView is not "DrawTools" and the visible of background button id 84 is true then HideDrawTools
if ToolView is in "ButtonTools DrawTools" and the visible of background button id 10 is true then HideFieldTools
showtools
end if
end SetUp
on mouseDown
end mouseDown
-- part 81 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=499 top=21 right=49 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 23594 / 23594
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Edit
----- HyperTalk script -----
on mouseUp
global Restore
if the optionKey is up then
if Restore is empty then
set the cursor to busy
repeat with i = 1 to the number of buttons
if the visible of button i is true
then
put (the number of button i) & "," after restore
set the visible of button i to false
set the cursor to busy
end if
end repeat
repeat with i = 1 to the number of card fields
set the lockText of card field i to false
set the cursor to busy
end repeat
set the textArrows to true
else
set the cursor to busy
repeat with i = 1 to the number of card fields
set the lockText of card field i to true
set the cursor to busy
end repeat
repeat with i = 1 to the number of items in restore
put item i of restore into needed
set the visible of button needed to true
set the cursor to busy
end repeat
put empty into Restore
set the textArrows to false
end if
set the cursor to browse
else GiveHelp "Edit…"
end mouseUp
on mouseDown
end mouseDown
-- part 9 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=386 top=202 right=234 bottom=486
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hiliter
-- part 79 (button)
-- low flags: 80
-- high flags: 0001
-- rect: left=387 top=234 right=266 bottom=485
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Mask
-- part 82 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=388 top=202 right=234 bottom=484
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Flasher
-- part 83 (button)
-- low flags: 80
-- high flags: 0001
-- rect: left=382 top=170 right=202 bottom=483
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Shutter
-- part 10 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=211 top=320 right=338 bottom=233
-- title width / last selected line: 0
-- icon id / first selected line: 949 / 949
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: MakeTitleField
----- HyperTalk script -----
on mouseUp
if the optionKey is up then MakeTitleField
else GiveHelp "Title "
end mouseUp
on mouseDown
end mouseDown
-- part 11 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=463 top=320 right=338 bottom=485
-- title width / last selected line: 0
-- icon id / first selected line: 9839 / 9839
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Columns
----- HyperTalk script -----
on mouseUp
if the optionKey is up then domenu "Columns…"
else GiveHelp "Columns…"
end mouseUp
on mouseDown
end mouseDown
-- part 12 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=255 top=320 right=338 bottom=277
-- title width / last selected line: 0
-- icon id / first selected line: 13275 / 13275
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: FullCard
----- HyperTalk script -----
on mouseUp
if the optionKey is up then createField 5 --FullSlide
else GiveHelp "FullSlide "
end mouseUp
on mouseDown
end mouseDown
-- part 14 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=233 top=320 right=338 bottom=255
-- title width / last selected line: 0
-- icon id / first selected line: 19230 / 19230
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Body
----- HyperTalk script -----
on mouseUp
if the optionKey is up then createField 8 --Body
else GiveHelp "Body "
end mouseUp
on mouseDown
end mouseDown
-- part 16 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=228 top=320 right=338 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 18005 / 18005
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: HiliterMaker
----- HyperTalk script -----
on mouseUp
if the optionKey is up then CreateButton 9 --hiliter
else GiveHelp "Hiliter "
end mouseUp
on mousedown
end mousedown
-- part 20 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=61 top=320 right=338 bottom=85
-- title width / last selected line: 0
-- icon id / first selected line: 14176 / 14176
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: NewStack
----- HyperTalk script -----
on mouseUp
if the optionKey is up then newLecture
else GiveHelp "New Lecture…"
end mouseUp
on mouseDown
end mouseDown
-- part 21 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=85 top=320 right=338 bottom=109
-- title width / last selected line: 0
-- icon id / first selected line: 30845 / 30845
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: NewCard
----- HyperTalk script -----
on mouseUp
if the optionKey is up then MakeCard
else GiveHelp "Make Next Slide "
end mouseUp
on mouseDown
end mouseDown
-- part 22 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=499 top=289 right=308 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 10210 / 10210
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: FieldTool
----- HyperTalk script -----
on mouseUp
if the optionKey is up then choose field tool
else GiveHelp "Field Tool "
end mouseUp
on mouseDown
end mouseDown
-- part 23 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=499 top=268 right=286 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 9340 / 9340
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ButtonTool
----- HyperTalk script -----
on mouseUp
if the optionKey is up then choose button tool
else GiveHelp "Button Tool "
end mouseUp
on mouseDown
end mouseDown
-- part 25 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=498 top=238 right=256 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 28381 / 28381
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: UnlockFields
----- HyperTalk script -----
on mouseUp
global FieldsLocked
if FieldsLocked
then
if the optionKey is up then unlockFields
else GiveHelp "Unlock All "
else
if the optionKey is up then lockFields
else GiveHelp "Lock All "
end if
end mouseUp
on mouseDown
end mouseDown
-- part 27 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=211 top=320 right=338 bottom=233
-- title width / last selected line: 0
-- icon id / first selected line: 24368 / 24368
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DrawLine
----- HyperTalk script -----
on mouseUp
if the optionKey is up then MakeLine "Straight"
else GiveHelp "Straight Line…"
end mouseUp
on mouseDown
end mouseDown
-- part 28 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=0 top=22 right=167 bottom=67
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: linespecs
-- part 33 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=0 top=0 right=12 bottom=156
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: FX
-- part 68 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=183 top=320 right=338 bottom=207
-- title width / last selected line: 0
-- icon id / first selected line: 15999 / 15999
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: FX
----- HyperTalk script -----
on mouseUp
if the optionKey is up then
if the shiftKey is up then
setEffects
else
put "scroll left slowly to card" & return & "scroll right slowly to card" into background field "FXHolder"
end if
else
GiveHelp "Set Effects…"
end if
end mouseUp
on mouseDown
end mouseDown
-- part 69 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=277 top=320 right=338 bottom=299
-- title width / last selected line: 0
-- icon id / first selected line: 31043 / 31043
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: BigType
----- HyperTalk script -----
on mouseUp
if the optionKey is up then createField 76 --BigType
else GiveHelp "BigType "
end mouseUp
on mouseDown
end mouseDown
-- part 70 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=276 top=320 right=338 bottom=300
-- title width / last selected line: 0
-- icon id / first selected line: 13086 / 13086
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: FlasherMaker
----- HyperTalk script -----
on mouseUp
if the optionKey is up then CreateButton 82 --flasher
else GiveHelp "Flasher "
end mouseUp
on mouseDown
end mouseDown
-- part 72 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=344 top=320 right=338 bottom=368
-- title width / last selected line: 0
-- icon id / first selected line: 21496 / 21496
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ShutterMaker
----- HyperTalk script -----
on mouseUp
if the optionKey is up then CreateButton 83 --shutter
else GiveHelp "Shutter "
end mouseUp
on mouseDown
end mouseDown
-- part 76 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=110 top=89 right=236 bottom=393
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 512
-- text size: 48
-- style flags: 256
-- line height: 64
-- part name: BigType
-- part 80 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=368 top=320 right=338 bottom=392
-- title width / last selected line: 0
-- icon id / first selected line: 18941 / 18941
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: MaskMaker
----- HyperTalk script -----
on mouseUp
if the optionKey is up then CreateButton 79 --Mask
else GiveHelp "Mask "
end mouseUp
on mouseDown
end mouseDown
-- part 84 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=452 top=320 right=338 bottom=476
-- title width / last selected line: 0
-- icon id / first selected line: 19676 / 19676
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Eraser
----- HyperTalk script -----
on mouseUp
if the ShiftKey is down then
if the optionKey is up then EraseCard
else GiveHelp "Erase All Graphics "
else
if the optionkey is up then
choose eraser tool
doMenu "revert"
choose browse tool
else
GiveHelp "Erase Recent "
end if
end if
end mouseUp
on mouseDown
end mouseDown
-- part 86 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=498 top=172 right=191 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 31872 / 31872
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: LeftAlign
----- HyperTalk script -----
on mouseUp
global Mode
if the optionKey is up then
put "left" into Mode
lockFields
else GiveHelp "LeftAlign…"
end mouseUp
on mouseDown
end mouseDown
-- part 87 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=499 top=194 right=212 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 31257 / 31257
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CenterAlign
----- HyperTalk script -----
on mouseUp
global Mode
if the optionKey is up then
put "center" into Mode
lockFields
else GiveHelp "Center…"
end mouseUp
on mouseDown
end mouseDown
-- part 88 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=498 top=215 right=233 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 32309 / 32309
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: RightAlign
----- HyperTalk script -----
on mouseUp
global Mode
if the optionKey is up then
put "right" into Mode
lockFields
else GiveHelp "RightAlign…"
end mouseUp
on mouseDown
end mouseDown
-- part 92 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=135 top=320 right=338 bottom=159
-- title width / last selected line: 0
-- icon id / first selected line: 3233 / 3233
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ShowButtonTools
----- HyperTalk script -----
--show buttons for making buttons
on mouseUp
global ToolView
if the optionKey is up then
if Toolview is "FieldTools"
then
HideFieldTools
end if
if ToolView is "DrawTools"
then
HideDrawTools
end if
if ToolView is not "ButtonTools"
then
ShowButtonTools
put "ButtonTools" into ToolView
end if
else
GiveHelp "The Butn Menu "
end if
end mouseUp
on mouseDown
end mouseDown
-- part 93 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=111 top=320 right=338 bottom=135
-- title width / last selected line: 0
-- icon id / first selected line: 26204 / 26204
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ShowFieldTools
----- HyperTalk script -----
--show buttons for making fields
on mouseUp
global ToolView
if the optionKey is up then
if Toolview is "ButtonTools"
then
HideButtonTools
end if
if ToolView is "DrawTools"
then
HideDrawTools
end if
if ToolView is not "FieldTools"
then
ShowFieldTools
put "FieldTools" into ToolView
end if
else
GiveHelp "The Field Menu "
end if
end mouseUp
on mouseDown
end mouseDown
-- part 94 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=159 top=320 right=338 bottom=183
-- title width / last selected line: 0
-- icon id / first selected line: 7444 / 7444
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ShowDrawTools
----- HyperTalk script -----
--show buttons for drawing and recording the drawing
on mouseUp
global ToolView
if the optionKey is up then
if Toolview is "FieldTools"
then
HideFieldTools
end if
if ToolView is "ButtonTools"
then
HideButtonTools
end if
if ToolView is not "DrawTools"
then
ShowDrawTools
put "DrawTools" into ToolView
end if
else
GiveHelp "The Draw Menu "
end if
end mouseUp
on mouseDown
end mouseDown
-- part 99 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=208 top=320 right=338 bottom=228
-- title width / last selected line: 0
-- icon id / first selected line: 15335 / 15335
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ChainTool
----- HyperTalk script -----
on mouseUp
global Mode
if Mode is empty then
if the optionKey is up then beginChain "noMessage"
else GiveHelp "Begin Chain…"
else
if the optionKey is up then endChain
else GiveHelp "End Chain "
end if
end mouseUp
on mouseDown
end mouseDown
-- part 100 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=69 top=33 right=257 bottom=261
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Chains
-- part 102 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=277 top=320 right=338 bottom=299
-- title width / last selected line: 0
-- icon id / first selected line: 22259 / 22259
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DrawArrow
----- HyperTalk script -----
on mouseUp
if the optionKey is up then MakeArrow "Straight"
else GiveHelp "Straight Arrow…"
end mouseUp
on mouseDown
end mouseDown
-- part 103 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=455 top=320 right=338 bottom=474
-- title width / last selected line: 0
-- icon id / first selected line: 1950 / 1950
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CheckBox Dingbat
----- HyperTalk script -----
on mouseUp
if the optionKey is up then CreateButton 110 --Checkbox DingBat
else GiveHelp "CheckBox "
end mouseUp
on mouseDown
end mouseDown
-- part 108 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=474 top=320 right=338 bottom=493
-- title width / last selected line: 0
-- icon id / first selected line: 12433 / 12433
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Arrow Dingbat
----- HyperTalk script -----
on mouseUp
if the optionKey is up then CreateButton 115 --Arrow DingBat
else GiveHelp "Arrow "
end mouseUp
on mouseDown
end mouseDown
-- part 109 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=493 top=320 right=338 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 1586 / 1586
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hand Dingbat
----- HyperTalk script -----
on mouseUp
if the optionKey is up then CreateButton 116 --Hand DingBat
else GiveHelp "Hand "
end mouseUp
on mouseDown
end mouseDown
-- part 110 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=16 top=170 right=202 bottom=49
-- title width / last selected line: 0
-- icon id / first selected line: 10454 / 10454
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CheckBox Dingbat
-- part 115 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=16 top=170 right=202 bottom=49
-- title width / last selected line: 0
-- icon id / first selected line: 2415 / 2415
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Arrow Dingbat
-- part 116 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=16 top=170 right=202 bottom=49
-- title width / last selected line: 0
-- icon id / first selected line: 32381 / 32381
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hand
-- part 117 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=28 right=43 bottom=13
-- title width / last selected line: 0
-- icon id / first selected line: 28210 / 28210
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DelayButtons
----- HyperTalk script -----
--Make Delay button
on mouseUp
CreateButton 209
choose browse tool
end mouseUp
on mouseDown
end mouseDown
-- part 119 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=63 right=78 bottom=13
-- title width / last selected line: 0
-- icon id / first selected line: 426 / 426
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: BeepButtons
----- HyperTalk script -----
--Make Beep button
on mouseUp
CreateButton 210
choose browse tool
end mouseUp
on mouseDown
end mouseDown
-- part 121 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=299 top=320 right=338 bottom=319
-- title width / last selected line: 0
-- icon id / first selected line: 6723 / 6723
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: MakePoPUp
----- HyperTalk script -----
on mouseUp
if the optionKey is up then MakePopUp
else GiveHelp "PopUp "
end mouseUp
on mouseDown
end mouseDown
-- part 122 (field)
-- low flags: 80
-- high flags: 2004
-- rect: left=336 top=107 right=224 bottom=481
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 91
-- text size: 24
-- style flags: 0
-- line height: 32
-- part name: PopUp
-- part 124 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=0 top=236 right=273 bottom=13
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Draw╩
----- HyperTalk script -----
on mouseUp
if the optionKey is down then
put the short name of me into command
delete char 1 to 5 of command
GiveHelp command
else pass mouseUp
end mouseUp
on mousedown
if the optionKey is up then pass mouseDown
end mouseDown
-- part 125 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=0 top=169 right=258 bottom=49
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: PopUps
-- part 126 (button)
-- low flags: 00
-- high flags: 0002
-- rect: left=35 top=320 right=338 bottom=57
-- title width / last selected line: 0
-- icon id / first selected line: 633 / 633
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CleanUp
----- HyperTalk script -----
--button for setting card to initial working state
on mouseUp
if the optionKey is up then
if the shiftKey is down then
ResetAll
else
Reset
end if
else
if the shiftKey is down then
GiveHelp "Reset All Slides "
else
GiveHelp "Reset Slide "
end if
end if
end mouseUp
on mouseDown
end mouseDown
-- part 129 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=252 top=320 right=338 bottom=276
-- title width / last selected line: 0
-- icon id / first selected line: 25650 / 25650
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: HiliterTiler
----- HyperTalk script -----
on mouseUp
global Mode
if the optionKey is up then
put "tile" into Mode
lockFields
else GiveHelp "Tile Hiliter…"
end mouseUp
on mouseDown
end mouseDown
-- part 130 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=255 top=170 right=255 bottom=455
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ButtonRects
-- part 132 (button)
-- low flags: 80
-- high flags: 0001
-- rect: left=216 top=181 right=263 bottom=440
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Shrinker
----- HyperTalk script -----
on restore
put the id of me into holder
set the rect of me to line holder of background field "ButtonRects"
put 1 into item 1 of line holder of field Chains
end restore
-- part 133 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=392 top=320 right=338 bottom=416
-- title width / last selected line: 0
-- icon id / first selected line: 160 / 160
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ShrinkerMaker
----- HyperTalk script -----
on mouseUp
global Mode
if the optionKey is up then
put "shrinkwrap" into Mode
lockFields
else GiveHelp "Shrinker…"
end mouseUp
on mouseDown
end mouseDown
-- part 134 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=498 top=151 right=169 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 1347 / 1347
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Squeezer
----- HyperTalk script -----
on mouseUp
if the optionKey is up then setSqueeze
else GiveHelp "Squeeze Lines "
end mouseUp
on mouseDown
end mouseDown
-- part 135 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=39 top=55 right=258 bottom=477
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 512
-- text size: 48
-- style flags: 0
-- line height: 64
-- part name: AutoScroller 2
----- HyperTalk script -----
on autoScroll
put word 2 of the short name of me into scrollrate
set the scroll of me to 0
put the number of lines of me into myLength
put the rect of me into myrect
put the textheight of me into lineHeight
put 0 into myscroll
put (item 4 of myrect) - (item 2 of myrect) into mybottom
put 2 + (myLength*lineHeight) - myBottom into myBottom
repeat while myscroll < myBottom
add scrollrate to myscroll
set the scroll of me to myscroll
end repeat
end autoScroll
-- part 137 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=178 top=49 right=98 bottom=304
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 91
-- text size: 18
-- style flags: 0
-- line height: 24
-- part name: Rectangle
-- part 139 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=382 top=202 right=234 bottom=483
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: GreyOut
----- HyperTalk script -----
-- part 140 (button)
-- low flags: 80
-- high flags: 8000
-- rect: left=422 top=284 right=306 bottom=486
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Step (1)
----- HyperTalk script -----
on restore
put the id of me into holder
put 1 into item 1 of line holder of field Heirarchy
if item 2 of line holder of field Heirarchy is empty
then
set the name of button ID holder to "Step (1)"
else
set the name of button ID holder to "Step 1"
end if
end restore
-- part 141 (field)
-- low flags: 80
-- high flags: 2007
-- rect: left=16 top=48 right=305 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 91
-- text size: 24
-- style flags: 0
-- line height: 32
-- part name: Scrolling
-- part 142 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=156 top=120 right=205 bottom=356
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ObjectNames
-- part 143 (field)
-- low flags: 80
-- high flags: 6002
-- rect: left=91 top=44 right=303 bottom=148
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: YValues
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 144 (field)
-- low flags: 80
-- high flags: 6002
-- rect: left=26 top=44 right=303 bottom=83
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: XValues
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 147 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=157 top=25 right=306 bottom=476
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: GraphEntry
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 149 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=212 top=275 right=297 bottom=312
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: No╩Change
----- HyperTalk script -----
on mouseUp
global XCoords, YCoords
put XCoords into field "XValues"
put YCoords into field "YValues"
select after line 1 of field "XValues"
end mouseUp
On mouseDown
end mouseDown
-- part 150 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=322 top=275 right=297 bottom=422
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Delete╩Graph
----- HyperTalk script -----
on mouseUp
global Mode
put "NoGraph" into Mode
send DefineArea to field "Scripts"
end mouseUp
on mouseDown
end mouseDown
-- part 154 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=211 top=238 right=272 bottom=422
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Values╩Okay
----- HyperTalk script -----
on mouseUp
send DefineArea to field Scripts
end mouseUp
On mouseDown
end mouseDown
-- part 155 (field)
-- low flags: 81
-- high flags: 2002
-- rect: left=100 top=59 right=259 bottom=400
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: GraphArea
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 156 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=386 top=284 right=306 bottom=486
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Area╩OK
----- HyperTalk script -----
on mouseUp
send GetGraphLabels to field "Scripts"
end mouseUp
on mouseDown
end mouseDown
-- part 166 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=138 top=118 right=144 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: XMax
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 168 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=138 top=220 right=246 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: XInt
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 170 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=138 top=169 right=195 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: XMin
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 173 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=251 top=118 right=144 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: YMax
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 175 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=251 top=220 right=246 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: YInt
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 177 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=251 top=169 right=195 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: YMin
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 186 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=138 top=41 right=67 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Coordinate╩Axes
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 187 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=138 top=67 right=93 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: X╩Axis
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 188 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=251 top=67 right=93 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Y╩Axis
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 190 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=138 top=93 right=119 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Maximum╩X
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 191 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=251 top=93 right=119 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Maximum╩Y
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 193 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=138 top=195 right=221 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: X╩Interval
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 194 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=251 top=195 right=221 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Y╩Interval
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 196 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=138 top=144 right=170 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Minimum╩X
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 197 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=251 top=144 right=170 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Minimum╩Y
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 201 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=378 top=169 right=191 bottom=483
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Abort╩Graph
----- HyperTalk script -----
on mouseUp
global Mode
put "NoGraph" into Mode
send mouseUp to background button "Axes Okay"
end mouseUp
on mouseDown
end mouseDown
-- part 202 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=26 top=24 right=44 bottom=83
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ╩X╩
----- HyperTalk script -----
on mouseUp
end mouseUp
On mouseDown
end mouseDown
-- part 203 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=91 top=24 right=44 bottom=148
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ╩Y╩
----- HyperTalk script -----
on mouseUp
end mouseUp
On mouseDown
end mouseDown
-- part 205 (field)
-- low flags: 80
-- high flags: 2004
-- rect: left=141 top=128 right=213 bottom=341
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Shimmer
-- part 206 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=95 right=112 bottom=13
-- title width / last selected line: 0
-- icon id / first selected line: 8276 / 8276
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: LockScreenButtons
----- HyperTalk script -----
--Make LockScreen button
on mouseUp
CreateButton 207
choose browse tool
end mouseUp
on mouseDown
end mouseDown
-- part 207 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=0 top=89 right=120 bottom=12
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: LockScreen
----- HyperTalk script -----
on mouseUp
if the optionKey is down then GiveHelp "LockScreen "
else pass mouseUp
end mouseUp
on mousedown
if the optionKey is up then pass mouseDown
end mouseDown
-- part 209 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=0 top=19 right=50 bottom=12
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Delay
----- HyperTalk script -----
on mouseUp
if the optionKey is down then GiveHelp "Delay "
else pass mouseUp
end mouseUp
on mousedown
if the optionKey is up then pass mouseDown
end mouseDown
-- part 210 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=0 top=55 right=86 bottom=12
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Beep
----- HyperTalk script -----
on mouseUp
if the optionKey is down then GiveHelp "Beep "
else pass mouseUp
end mouseUp
on mousedown
if the optionKey is up then pass mouseDown
end mouseDown
-- part 226 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=378 top=133 right=166 bottom=483
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Axes╩Okay
----- HyperTalk script -----
on mouseUp
global Mode, ObjectID
hide background button id 186 --Coordinate Axes
hide background button id 187 --X Axis
hide background button id 188 --Y Axis
hide background button id 190 --Maximum X
hide background button id 191 --Maximum Y
hide field id 166 --XMax
hide field id 173 --YMax
hide background button id 196 --Minimum X
hide background button id 197 --Minimum Y
hide field id 170 --XMin
hide field id 177 --YMin
hide background button id 193 --X Interval
hide background button id 194 --Y Interval
hide field id 168 --XInt
hide field id 175 --YInt
hide background button id 227 --X Unit Label
hide background button id 228 --Y Unit Label
hide field id 231 --XLabel
hide field id 230 --YLabel
hide background button id 226 --Axes Okay
hide background button id 201 --Abort Graph
if Mode is not "NoGraph"
then
show field "RequestGraphType" --requests type of graph
put return & return & "Select desired type of graph:" into field "RequestGraphType"
show background button "Line Graph"
show background button "Bar Graph"
show background button "Plot Graph"
show background button "Pie Graph"
if line 4 of field id 155 is empty then
Createbutton 267
put ObjectID into line 4 of field id 155
choose browse tool
end if
else
put empty into line 3 of field id 155
show card picture
end if
put empty into mode
end mouseUp
on mouseDown
end mouseDown
-- part 227 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=138 top=246 right=272 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: X╩Unit╩Label
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 228 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=251 top=246 right=272 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Y╩Unit╩Label
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
end mouseDown
-- part 230 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=251 top=271 right=297 bottom=365
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: YLabel
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 231 (field)
-- low flags: 80
-- high flags: 2002
-- rect: left=20 top=271 right=297 bottom=252
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: XLabel
----- HyperTalk script -----
on mouseup
end mouseUp
on mousedown
end mousedown
-- part 233 (button)
-- low flags: 80
-- high flags: 0002
-- rect: left=0 top=131 right=148 bottom=13
-- title width / last selected line: 0
-- icon id / first selected line: 45 / 45
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: OpenerMaker
----- HyperTalk script -----
--Make Opener button
on mouseUp
CreateButton 234
choose browse tool
end mouseUp
on mouseDown
end mouseDown
-- part 234 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=0 top=123 right=154 bottom=12
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Opener
----- HyperTalk script -----
on mouseUp
if the optionKey is down then GiveHelp "On OpenCard "
else pass mouseUp
end mouseUp
on mousedown
if the optionKey is up then pass mouseDown
end mouseDown
-- part 237 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=59 top=253 right=295 bottom=436
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 91
-- text size: 24
-- style flags: 0
-- line height: 32
-- part name: TypeWriter
-- part 243 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=24 top=17 right=307 bottom=482
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Scripts
----- HyperTalk script -----
on draw
--handles drawing & recording lines and arrows
global lineFlag
if lineFlag is 2 or lineFlag is 4 then getPoint2
if LineFlag is 3 then getPoint1 1 --with arrowhead
if lineFlag is 1 then getPoint1 0 --without arrowhead
hide msg
end draw
on getPoint1 tip
global lineStyle, lineFlag, SX, SY, Speed, NextLine
put item 1 of the clickLoc into SX
put item 2 of the clickLoc into SY
if lineStyle is "wavy"
then
put 1 into line NextLine of field "LineSpecs"
put 2*(round(SX/2)) into SX
put 2*(round(SY/2)) into SY
else if LineStyle is "Dotted"
then
put 3 into line NextLine of field "LineSpecs"
else
put 0 into line NextLine of field "LineSpecs"
end if
put space & tip after line NextLine of field "LineSpecs"
add 1 to lineFlag
end getpoint1
on getPoint2
global lineStyle, lineFlag, SX, SY, Speed, NextLine, Mode
put 0 into lineFlag
put item 1 of the clickLoc into FX
put item 2 of the clickLoc into FY
if lineStyle is "Wavy"
then
put 2*(round(FX/2)) into FX
put 2*(round(FY/2)) into FY
end if
if abs(SX-FX) <= abs(SY-FY)
then --vertical
put min(SX,FX) into SX
put min(SX,FX) into FX
if lineStyle is "Dotted"
then
put 4 into word 1 of line NextLine of field "LineSpecs"
end if
else --horizontal
put min(SY,FY) into SY
put min(SY,FY) into FY
if lineStyle is "Dotted"
then
put 3 into word 1 of line NextLine of field "LineSpecs"
end if
end if
put " " & SX && SY && FX && FY & "," after line NextLine of field "LineSpecs"
put 2000 into Speed
GetLines
put 100 into Speed
put empty into Mode
end getPoint2
function list wordstring
put word 1 of wordstring into newlist
repeat with i = 2 to the number of words in wordstring
put "," & word i of wordstring after newlist
end repeat
return newlist
end list
on GetLines
global NextLine, Specs
put line NextLine of field "lineSpecs" into LineList
--each item gives specifications for another line
--in each item:
--word 1: 0 for straight line, 1 for wavy
-- 2 for white (erase), 3 for dotted
--word 2: 0 for line only, 1 for arrow
--remaining words (in pairs): coordinates of segment endpoints
repeat with i = 1 to the number of items in LineList
put List(item i of LineList) into Specs --converts words to items
DrawLine
end repeat
end GetLines
on DrawLine
global Speed, lineWidth, Start, Specs
choose line tool
put item 3 to 4 of Specs into Start
put item 5 to 6 of specs into Finish
if item 2 of Specs is 1
then
DrawArrowHead Specs
end if
set lineSize to lineWidth
set the dragSpeed to Speed
if item 1 of Specs is 1 then --wavy line
set pattern to 7
else if item 1 of Specs is 2 then --white line (erase)
set pattern to 1
else if item 1 of Specs is 3 then --horizontal dotted line
set pattern to 37
else if item 1 of Specs is 4 then --vertical dotted line
set pattern to 38
else --solid line; item 1 is 0
set pattern to 12
end if
unlock screen
drag from Start to Finish with optionKey --draw first line segment
delete item 1 to 4 of Specs
repeat until the number of items in Specs <= 2
put item 1 to 2 of Specs into Start
put item 3 to 4 of Specs into Finish
drag from start to finish with optionKey
delete item 1 to 2 of Specs
end repeat
choose browse tool
end DrawLine
on DrawArrowHead wanted
global Start
put Start into Tip
put 8 into trim --used to correct Start of shaft
put item 3 of wanted into TX
put item 4 of wanted into TY
put item 5 of wanted into SX
put item 6 of wanted into SY
if SX < TX --point right
then
put ((TX - 6)&","&(TY - 6)) into LeftBarb
put ((TX - 6)&","&(TY + 6)) into RightBarb
put TX - trim into item 1 of Start
else
if TX < SX --point left
then
put ((TX + 6)&","&(TY - 6)) into LeftBarb
put ((TX + 6)&","&(TY + 6)) into RightBarb
put TX + trim into item 1 of Start
else
if TY < SY --point up
then
put ((TX - 6)&","&(TY + 6)) into LeftBarb
put ((TX + 6)&","&(TY + 6)) into RightBarb
Put TY + trim into item 2 of Start
else --point down
put ((TX - 6)&","&(TY - 6)) into LeftBarb
put ((TX + 6)&","&(TY - 6)) into RightBarb
put TY - trim into item 2 of Start
end if
end if
end if
set the lineSize to 1
set the dragspeed to 2000
drag from LeftBarb to Tip
drag from Tip to RightBarb
drag from RightBarb to LeftBarb
choose bucket tool
set the pattern to 12
put round(((item 1 of tip)+(item 1 of start))/2) into X
put round(((item 2 of tip)+(item 2 of start))/2) into Y
click at X,Y
choose line tool
set the lineSize to 3
end DrawArrowHead
on ConnectFields
global Rect1, Rect2, lineWidth, Specs
put the id of the target into wanted
requestPatience
if (item 1 of Rect1) - (item 3 of Rect2) > 17 then
put Rect2 into temp
put Rect1 into Rect2
put temp into Rect1
end if
if (item 2 of Rect1) - (item 4 of Rect2) > 17 then
put Rect2 into temp
put Rect1 into Rect2
put temp into Rect1
end if
put item 1 of Rect1 into Lft1
put item 2 of Rect1 into Top1
put item 3 of Rect1 into Rit1
put item 4 of Rect1 into Bot1
put item 1 of Rect2 into Lft2
put item 2 of Rect2 into Top2
put item 3 of Rect2 into Rit2
put item 4 of Rect2 into Bot2
put 2 into item 1 of specs --initially, draw white line (i.e. erase)
put 0 into item 2 of specs --no arrowhead
if Top2 - Bot1 > 17 then
put round(average(Lft1,Rit1)) into X1
put Bot1 into Y1
put X1 into X2
put round(average(Bot1,Top2)) into Y2
put round(average(Lft2,Rit2)) into X3
put Y2 into Y3
put X3 into X4
put Top2 into Y4
if abs(X1 - X4) < 10
then
put X1 into X2
put X1 into X3
put X1 into X4
end if
else if Lft2 - Rit1 > 17 then
put Rit1 into X1
put round(average(Top1,Bot1)) into Y1
put round(average(Rit1,Lft2)) into X2
put Y1 into Y2
put X2 into X3
put round(average(Bot2,Top2)) into Y3
put Lft2 into X4
put Y3 into Y4
if abs(Y1 - Y4) < 10
then
put Y1 into Y2
put Y1 into Y3
put Y1 into Y4
end if
else
answer "Can't connect such close fields."
exit connectFields
end if
put X1 into item 3 of Specs
put Y1 into item 4 of Specs
put X2 into item 5 of Specs
put Y2 into item 6 of Specs
put X3 into item 7 of Specs
put Y3 into item 8 of Specs
put X4 into item 9 of specs
put Y4 into item 10 of Specs
put 6 into lineWidth
put specs into temp
DrawLine --draw wide white line (i.e. erase)
put temp into Specs
put 0 into item 1 of Specs
put 4 into LineWidth
Drawline --draw narrower black line
put 3 into lineWidth --restore to standard width for lines
end ConnectFields
on ClearCard except
global CardButtons, CardFields
put empty into CardButtons
repeat with i = 1 to the number of buttons
if the id of button i is not item 1 of Except
--(line 2 of field "GraphArea", if anything)
then
if the visible of button i is true then
put the id of button i into item i of CardButtons
end if
end if
hide button i
end repeat
put empty into CardFields
repeat with i = 1 to the number of card fields
if the id of card field i is not item 2 of Except
--(line 1 of field "GraphArea")
then
if the visible of card field i is true then
put the id of card field i into item i of CardFields
end if
end if
hide card field i
end repeat
hide card picture
end ClearCard
on RestoreCard
global CardButtons, CardFields
show card picture
repeat with i = 1 to the number of items of CardFields
if item i of CardFields is not empty
then show card field id (item i of CardFields)
end repeat
repeat with i = 1 to the number of items of CardButtons
if item i of CardButtons is not empty
then show button id (item i of CardButtons)
end repeat
end RestoreCard
on MakeGraph
global Mode, XCoords, YCoords,XChanged, YChanged
put "Graph" into Mode
put false into XChanged
put false into YChanged
put line 2 of field "GraphArea" into item 1 of Except
put line 1 of field "GraphArea" into item 2 of Except
ClearCard Except
Show background button id 202 --X
Show background button id 203 --Y
Show field "XValues"
put field "XValues" into XCoords
Show field "YValues"
put field "YValues" into YCoords
ShowGraphInstructions
Show background button id 154 --"Values OK"
Show background button id 149 --"No Change"
Show background button id 150 --"Delete Graph"
set the locktext of field "XValues" to false
set the locktext of field "YValues" to false
select after line 1 of field "XValues"
end MakeGraph
on ShowGraphInstructions
Show field "GraphEntry" --(to hold Instructions)
put return & "Enter X and Y numerical values" & return into contents
put "in the columns at the left." & return & return after contents
put "X values should be in ascending" & return after contents
put "or descending order." & return & return after contents
put "If X column is left empty," & return after contents
put "equal unlabelled intervals" & return after contents
put "will be assumed." & return & return after contents
put "For pie graphs, use Y column only." after contents
put contents into field "GraphEntry"
end ShowGraphInstructions
on DefineArea
global Mode, XCoords, YCoords, XChanged, YChanged
HideGraphStarters
RestoreCard
if Mode is "NoGraph" then
put empty into field "XValues"
put empty into field "YValues"
put empty into Mode
put empty into line 3 of field "GraphArea" --records Mode
exit to HyperCard
end if
if XCoords <> field "XValues" then
put field "XValues" into XCoords
put true into XChanged
end if
if YCoords <> field "YValues" then
put field "YValues" into YCoords
put true into YChanged
end if
ShowAreaSetters
choose field tool
select card field id (line 1 of field "GraphArea")
end DefineArea
on HideGraphStarters
Hide background button id 150 --Delete Graph
Hide background button id 149 --No Change
Hide background button id 154 --ValuesOK
Hide background button id 202 --X
Hide field "XValues"
Hide background button id 203 --Y
Hide field "YValues"
Hide field "GraphEntry"
end HideGraphStarters
on ShowAreaSetters
global ObjectID
requestPatience
lock screen
if field "GraphArea" is empty
then
CreateField 155 --GraphArea
put ObjectID into line 1 of field "GraphArea"
Put return & return & "Adjust the size and location of this field " & "to the size and location desired for your graph." & return&return & "Allow some room at left and bottom for labels." & return&return & "Then restore browse tool " & return & "and click " & quote & "Area OK" & quote & "." into card field id (line 1 of field "GraphArea")
CreateButton 156 --Area Okay
put ObjectID into line 2 of field "GraphArea"
else
show card field id (line 1 of field "GraphArea")
if the short name of card field (the number of card fields) is not "GraphArea" or the id of button (the number of buttons) > (line 1 of field "GraphArea") then
select card field id (line 1 of field "GraphArea")
type "+" with Shiftkey,CommandKey
end if
show button id (line 2 of field "GraphArea")
if the short name of button (the number of buttons) is not "Area OK" or the id of card field (the number of card fields) > (line 2 of field "GraphArea") then
select button id (line 2 of field "GraphArea")
type "+" with Shiftkey,CommandKey
end if
choose browse tool
end if
put empty into msg
hide msg
unlock screen
end ShowAreaSetters
on GetGraphLabels
global XCoords
Hide card field id (line 1 of field "GraphArea") --GraphArea
Hide button id (line 2 of field "GraphArea") -- Area Okay
PresetLabelParams
put line 2 of field "GraphArea" into item 1 of Except
put line 1 of field "GraphArea" into item 2 of Except
ClearCard Except
ShowLabelTable
if XCoords is empty then select line 1 of field "YMax"
else select line 1 of field "XMax"
end GetGraphLabels
on PresetLabelParams
global XCoords, YCoords, MaxX, MaxY, MinX, MinY, IntX, IntY
put list(field "XValues") into XCoords
put list(field "YValues") into YCoords
put max(XCoords) into MaxX
put min(XCoords) into MinX
put max(YCoords) into MaxY
put min(YCoords) into MinY
if 0 < MinX and 2*MinX < MaxX then put 0 into MinX
if 0 < MinY and 2*MinY < MaxY then put 0 into MinY
HandleEmptyX
put round((MaxX - MinX)/10) into IntX
put round((MaxY - MinY)/10) into IntY
if IntX = 0 then put 1 into IntX
if IntY = 0 then put 1 into IntY
end PresetLabelParams
on HandleEmptyX
global XCoords, MaxX, MinX, IntX, MaxY, MinY, IntY, XChanged
if MinX = 0 and MaxX = 0
then
put empty into XCoords
put empty into field "XValues"
put "AUTO" into field "XMax"
set the lockText of field "XMax" to true
put "AUTO" into field "XMin"
set the lockText of field "XMin" to true
put "AUTO" into field "XInt"
set the lockText of field "XInt" to true
put "UNLABELLED" into field "XLabel"
set the lockText of field "XLabel" to true
put false into XChanged
else
if MinX = MaxX then put Min(0,(MinX-1)) into MinX
if MinY = MaxY then put Min(0,(MinY-1)) into MinY
set the lockText of field "XMax" to false
if "AUTO" is in field "XMax" then put MaxX into field "XMax"
set the lockText of field "XMin" to false
if "AUTO" is in field "XMin" then put MinX into field "XMin"
set the lockText of field "XInt" to false
if "AUTO" is in field "XInt" then put IntX into field "XInt"
set the lockText of field "XLabel" to false
if "UNLABELLED" is in field "XLabel" then put empty into field "XLabel"
end if
end HandleEmptyX
on ShowLabelTable
global MaxX, MaxY, MinX, MinY, IntX, IntY, XChanged, YChanged
show background button id 186 --Coordinate Axes
show background button id 187 --X Axis
show background button id 188 --Y Axis
show background button id 190 --Maximum X
show background button id 191 --Maximum Y
if XChanged then put MaxX into field "XMax"
show field "XMax"
if YChanged then put MaxY into field "YMax"
show field "YMax"
show background button id 196 --Minimum X
show background button id 197 --Minimum Y
if XChanged then put MinX into field "XMin"
show field "XMin"
if YChanged then put MinY into field "YMin"
show field "YMin"
show background button id 193 --X Interval
show background button id 194 --Y Interval
if XChanged then put IntX into field "XInt"
show field "XInt"
if YChanged then put IntY into field "YInt"
show field "YInt"
show background button id 227 --X Unit Label
show background button id 228 --Y Unit Label
if field "XLabel" is empty then put "MONTHS?" into field "XLabel"
show field "XLabel"
if field "YLabel" is empty then put "DOLLARS?" into field "YLabel"
show field "YLabel"
show background button id 226 --Axes Okay
show background button id 201 --Abort Graph
end ShowLabelTable
on RecordGraphType
global Mode
put mode into line 3 of field "GraphArea" --record type of graph